﻿using System;

namespace TextNovelReader.Services;

public class LocalEvents
{
    public event Action<double>? ReaderScrollRequested;
    public event Action<int>? ChapterIndexDeltaModified;
    public event Action<bool>? HideListViewRequested;
    public event Action<string>? TitleChanged; 

    public void RaiseReaderScrollRequested(double direction)
    {
        ReaderScrollRequested?.Invoke(direction); 
    }

    public void RaiseChapterIndexDeltaModified(int delta)
    {
        ChapterIndexDeltaModified?.Invoke(delta); 
    }

    public void RaiseHideListView(bool hide)
    {
        HideListViewRequested?.Invoke(hide); 
    }

    public void RaiseTitleChanged(string title)
    {
        TitleChanged?.Invoke(title); 
    }
}
